package com.example.school.controller.user;

import com.example.school.dto.UserAddMoneyDto;
import com.example.school.service.TariffService;
import com.example.school.utils.common.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/user/tariff")
public class TariffController {

    @Autowired
    private TariffService tariffService;

    @GetMapping("get_tariff_money")
    public Result getTariffMoney(){
        return tariffService.getTariffMoney();
    }

    @PostMapping("add_tariff_money")
    public Result addTariffMoney(@RequestBody UserAddMoneyDto dto){
        return tariffService.addTariffMoney(dto);
    }

}
